


        Vue.component('v-header',{
            template:`<header class="fillAft">
            <div class="fluid flex flex-align-items">
                <a href="index.html" class="logo dc">
                    <img v-for="(item,i) in webLogo" v-if="item.ext01 == 'logo'" :src="item.imgPath">
                </a>
                <nav class="flex">
                    <ul class="flex">
                        <li>
                            <a href="about.html">关于我们</a>
                        </li>
                        <li v-for="(item,i) in service">
                            <a :href="i == 0?'live.html':('serviceInf.html?id=' + item.id)">{{item.title}}</a>
                        </li>
                        <li>
                            <a href="case.html?pointId=corp">供应链合作</a>
                        </li>
                        <li>
                            <a href="join.html">加入我们</a>
                        </li>
                        <li class="contact cursor mcjs">
                            <a href="contact.html">
                                <span class="hvc">联系我们</span>
                                <i></i>
                            </a>
                        </li>
                    </ul>
                </nav>
                <p class="menuBtn cursor"><span class="iv">关闭</span></p>
            </div>
            <div class="nav fill flex flex-align-items">
                <div class="inner">
                    <ul>
                        <li><a href="about.html">关于我们</a></li>
                        <li v-for="(item,i) in service">
                            <a :href="i == 0?'live.html':('serviceInf.html?id=' + item.id)">{{item.title}}</a>
                        </li>
                        <li><a href="case.html?pointId=corp">供应链合作</a></li>
                        <li><a href="join.html">加入我们</a></li>
                        <li><a href="contact.html">联系我们</a></li>
                    </ul>
                </div>
            </div>
        </header>`,
            data:function(){
                return{
                    nav:[],
                    webLogo:[],
                    service:[]
                }
            },
            created:function(){
                //nav
                
                axios.get(dataUrl + 'api/getNavbar',{
                    headers:{
                        Authorization: headers
                    }
                }).then((res) => {
                    //console.log(res.data.data);
                    this.nav = res.data.data;
                    setTimeout(function(){
                        for(var a = 0;a < $('header .fluid nav ul li').length - 1;a++){
                            if(window.location.href.indexOf($('header .fluid nav ul li').eq(a).find('a').attr('href')) >= 0){
                                $('header .fluid nav ul li').eq(a).addClass('active');
                                $('header .nav .inner li').eq(a).addClass('active');
                            }
                        }
                    })
                })
                
                //logo
                axios.post(dataUrl + 'api/getBanner',{identification:'COMMON_ICON'},{
                    headers:{
                      Authorization: headers
                    }
                })
                .then((res) => {
                    //console.log(res);
                    this.webLogo = res.data.data.reverse();
                })

                axios({
                    method:'post',
                    url: dataUrl + '/api/v2/getArchives',
                    headers:{Authorization: headers},
                    data:{id:52,desc:0,ext06:0,size:4,page:1}
                }).then((res)=>{
                    //console.log(res);
                    this.service = res.data.data.list;
                });
            },
            mounted(){
                var whiteList = ['index','declare','newsInfo','caseInf']
                if(window.location.href.indexOf('html') < 0){
                    $('header').addClass('white');
                }else{
                    for(var s = 0;s < whiteList.length;s++){
                        if(window.location.href.indexOf(whiteList[s]) >= 0){
                            $('header').addClass('white');
                            break;
                        }
                    }
                }
            }
        });